package com.wrb.base.controller;

import com.wrb.base.response.ServerResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

/**
 * @author wrb
 * @date 2019/11/25 11:40
 */
@RestController
@RequestMapping("/example")
@CrossOrigin(origins = "*", methods = {RequestMethod.POST, RequestMethod.GET})
@Api(tags = "示例controller")
public class ExampleController {

	@RequestMapping(value = "/example", method = RequestMethod.POST, produces = "application/json; charset=utf-8")
	@ApiOperation(value = "接口名称")
	public ResponseEntity register(
			@ApiParam(required = true, value = "值名称") @RequestParam(required = true) String value
	) {
		return ServerResponse.success(value);
	}
}
